package com.mdc.mansion.core.modules.basedata.dto;

import com.mdc.mansion.common.exception.BusinessException;
import com.mdc.mansion.common.util.I18nUtil;
import org.apache.commons.lang.StringUtils;

public class RestaurantPrinterDTO{
    private String id;
    private String name; //名称
    private String type; //型号
    private String ip; //IP
    private String port;  //端口
    private String paperWidth;	//纸宽


    public void verfiy() {
        //TODO 验证参数，多语言环境代码
        if(StringUtils.isBlank(name) ||
                StringUtils.isBlank(type) ||
                StringUtils.isBlank(ip) ||
                StringUtils.isBlank(port) ||
                StringUtils.isBlank(paperWidth)
                ){
            throw new BusinessException(I18nUtil.getMessage("param.error"));// 参数错误
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getPaperWidth() {
        return paperWidth;
    }

    public void setPaperWidth(String paperWidth) {
        this.paperWidth = paperWidth;
    }
}
